	/****************************************** 
  	 画图
   *******************************************/
	
	function setEChartConfig(){
						      require.config({
											  paths: {
												echarts: './js'
											  }
										    });
    }
	
	function drawMucusChart(){
	  	require(
		  [
			'echarts',
			'echarts/chart/bar',
		  ],
		  	  	  
		  function (ec) {
			mucusChart = ec.init(document.getElementById('mucusChart'));
			setMucusChartOption();		
		  });
	 }

		  function setMucusChartOption(){
		  	mucusChart.setOption({
				
				  //设置坐标系占webview空间大小
				  grid: {
				  			x: gridX,
				  			y: gridY,
				  			x2: gridX2,
				  			y2: gridY2
				  		},
				  			
				  tooltip : {//提示框，鼠标悬浮交互时的信息提示
				  				showContent: false,
								trigger: 'axis',//触发类型
								textStyle: {color: 'white'},
								formatter: function(params){
											 var mucusDay = params[0][1];
											 var mucus = params[0][2];

											 showMucusChartDetailForEach(mucusDay, mucus);
								            }		
											    	 
				  			},
				  			
				  legend: {//图例
				  			show: false,
							data: [mucusTitle, mucusPeriodTitle]
				  		   },
				  			
				  xAxis : [
							{
							  type : 'category',
							  axisLine:{show:false},
							  axisTick: {show: false},								  				  
							  data: xAxisDateArray,
							  axisLabel: {
							  				formatter: function(value) {
															return getDayStr(value);														
														}
										  }
							}
				  	      ],
				  	      
				  yAxis : [
							{
							  type : 'value',
							  min: yAxisMinMucus,
                              max: yAxisMaxMucus,
							  splitNumber: yAxisSplitNumber,
							  axisLine:{show:false},
							  axisLabel : {
							  				show: false,
							  				margin: yAxisMargin,
											textStyle:{color:'#8d8d8d'},
											formatter: function(value) {
																			return getyAxisLabel(value);
																		}
							  			  }
					      	  }
						  ],
						  
				  series : [
								{
								  name: mucusTitle,//图表名称
								  type:'bar',//图表类型
								  xAxisIndex : 0,
								  yAxisIndex : 0,
								  barGap: '0%',
								  barCategoryGap: '0%',
								  data: mucusDataArray,	
								  //itemStyle: {normal: {color: 'rgba(232, 189, 239, 0.6)' } }
								  itemStyle: {
								  				normal: {
								  							color: function(params) {
								  														var dateStr = xAxisDateArray[params.dataIndex];
                                                                                        return getPeriodBackGroundColor(dateStr);
                                                            }
                                                }
								  }
								}
				  			]
				  			
				}, true);
		  }
		  
		  
	
    
    
	  function getyAxisLabel(value){
	  		var yLabel;
			switch(value)
			{
				case 1:
					yLabel = '无/\n干燥\n\n';
					break;
				case 2:
					yLabel = '潮湿\n';
					break;
				case 3:
					yLabel = '粘稠/\n乳脂状\n\n';
					break;
				case 4:
					yLabel = '蛋清/\n水状\n\n';
					break;
				default:
					yLabel = '';
					break;
			}
			
			return yLabel;
	  }



